** Figure 4: Aggregate Evolution of Religious shares in Ghana 1891-2017
** Presbyterians, Methodists, Catholic
* Input data: Religion_shares_1900_2020.dta constructed from various sources as indicated by variable <source>

use "Data\Religion_shares_1900_2020.dta" , clear

sort year

twoway (scatter pop_share3 year if religion3=="Christian", mcol(black)) ///
 (qfit pop_share3 year if religion3=="Christian", lcol(black) lpattern(longdash) lwidth(thick)) ///
 (scatter pop_share3 year if religion3=="Muslim", lcol(gs8)) ///
 (qfit pop_share3 year if religion3=="Muslim", lcol(gs8) lpattern(solid) lwidth(thick))  ///
 (scatter pop_share3 year if religion3=="Traditional", mcol(black) ms(Dh) mlwidth(thick)) ///
 (qfit pop_share3 year if religion3=="Traditional", lcol(black) lpattern(solid) lwidth(thick)), ///
  leg(on order(1 3 5 2 4 6) col(3) label(1 "Christian") label(2 "" ) label(3 "Muslim" ) label(4 "" ) label(5 "Traditional" ) label(6 "" ) ) xlabel(1900 (20) 2020) xtitle("") ytitle("Percentage of Population", height(5) )
  
 graph export "Figure4a.pdf", replace
 


twoway (scatter pop_share1 year if religion1=="Methodist", mcol(gs8) ms(T)) ///
 (qfit pop_share1 year if religion1=="Methodist", lcol(gs8) lpattern(solid) lwidth(thick)) ///
  (scatter pop_share1 year if religion1=="Presbyterian" & year>=1920, mcol(black) ms(D)) ///
 (qfit pop_share1 year if religion1=="Presbyterian" & year>=1920, lcol(black) lpattern(dash) lwidth(thick)) ///
 (scatter pop_share2 year if religion2=="Catholic", mcol(black) ms(O)) ///
 (qfit pop_share2 year if religion2=="Catholic", lcol(black) lpattern(solid) lwidth(thick)), ///
leg(on order(1 3 5 2 4 6) col(3) label(1 "Methodist") label(2 "" ) label(3 "Presbyterian" ) label(4 "") label(5 "Catholic") label(6 "")) ///
	xlabel(1900 (20) 2020)  xtitle("") yscale(r(0 40)) ylabel(0(10)40) ytitle("Percentage of Population", height(5))
  
 graph export "Figure4b.pdf", replace